package com.fjwt.gz.service.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fjwt.gz.db.entity.AgentScoreRuleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fjwt.gz.db.vo.AgentScoreRuleVO;
import com.fjwt.gz.db.vo.ScoreRuleAndTotalVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 机构会员积分规则表 Mapper 接口
 * </p>
 *
 * @author shiyonghao
 * @since 2025-04-09
 */
public interface AgentScoreRuleMapper extends BaseMapper<AgentScoreRuleEntity> {

    List<AgentScoreRuleEntity> findScoreRuleListByAppId(@Param("appId")String appId);

    /**
     * 获取积分规则列表
     * @param iPage
     * @return
     */
    IPage<AgentScoreRuleEntity> findScoreRuleList(IPage iPage,@Param("agentNo")String agentNo);
    IPage<ScoreRuleAndTotalVO> findScoreRuleLists(IPage iPage, @Param("object") AgentScoreRuleVO object);

    /**
     * 获取规则详情
     * @param scoreRuleId
     * @return
     */
    ScoreRuleAndTotalVO queryRuleAndTotalByRuleId(String scoreRuleId);

    List<String> officialAccountsAppIdList(@Param("agentNo") String agentNo);
}
